package com.yuexun.dhdoctor.module.Chartered.ui;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.TextView;

import com.yuexun.dhdoctor.R;
import com.yuexun.dhdoctor.base.BaseKJActivity;
import com.yuexun.dhdoctor.module.Chartered.bean.CharteredBean;
import com.yuexun.dhdoctor.module.Chartered.model.impl.CharteredModel;
import com.yuexun.dhdoctor.module.Chartered.presenter.impl.CharteredPresenter;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2019/1/29 0029.
 */

public class Act_Chartered_Detail extends BaseKJActivity {

    @Bind(R.id.tv_name)
    TextView tvName;
    @Bind(R.id.tv_sex)
    TextView tvSex;
    @Bind(R.id.tv_tel)
    TextView tvTel;
    @Bind(R.id.tv_mail)
    TextView tvMail;
    @Bind(R.id.tv_nvq)
    TextView tvNvq;
    @Bind(R.id.tv_useful_time)
    TextView tvUsefulTime;
    @Bind(R.id.tv_tcb)
    TextView tvTcb;
    @Bind(R.id.tv_type)
    TextView tvType;
    @Bind(R.id.tv_range)
    TextView tvRange;
    @Bind(R.id.tv_andress)
    TextView tvAndress;
    @Bind(R.id.tv_record_date)
    TextView tvRecordDate;
    @Bind(R.id.tv_booker)
    TextView tvBooker;
    @Bind(R.id.tv_job_number)
    TextView tvJobNumber;
    @Bind(R.id.tv_dept)
    TextView tvDept;
    @Bind(R.id.tv_submit_time)
    TextView tvSubmitTime;
    @Bind(R.id.tv_remark)
    TextView tvRemark;

    CharteredBean charteredBean = new CharteredBean();

    @Override
    public void setRootView() {
        setContentView(R.layout.act_chartered_detail);
        ButterKnife.bind(this);
    }
    
    @Override
    public void initData() {
        super.initData();
        charteredBean = (CharteredBean)getIntent().getExtras().get("Chartered");
        setData();
    }

    private void setData() {
        tvName.setText(charteredBean.getUserName());
        if(charteredBean.getSex() == 1)
        {
            tvSex.setText("男");
        }
        else if(charteredBean.getSex() ==2)
        {
            tvSex.setText("女");
        }
        else {
            tvSex.setText("不详");
        }
        tvTel.setText(charteredBean.getPhoneNum());
        tvMail.setText(charteredBean.getEmail());
        tvNvq.setText(charteredBean.getLicenseCertificateNum());
        tvUsefulTime.setText(charteredBean.getBeginTime()+"--"+charteredBean.getEndTime());
        tvTcb.setText(charteredBean.getIssuingAgency());
        tvType.setText(charteredBean.getPracticeType());
        tvRange.setText(charteredBean.getPracticeScope());
        tvAndress.setText(charteredBean.getPracticePlace());
        tvRecordDate.setText(charteredBean.getCreateTime());
        tvBooker.setText(charteredBean.getAccountName());
        tvJobNumber.setText(charteredBean.getJobNum());
        tvDept.setText(charteredBean.getDepartment());
        tvSubmitTime.setText(charteredBean.getCreateDt());
        tvRemark.setText(charteredBean.getPracticeDtl());
    }

    @OnClick(R.id.back)
    public void onViewClicked() {
        finish();
    }
}
